import { createRouter,createWebHashHistory } from "vue-router";
const router=createRouter({
    history:createWebHashHistory(),
    routes:[
        //路由重定向
        {path:'/',redirect:'/login'},
        {path:'/login',component:()=>import('./components/Login.vue')},
        {path:'/home',component:()=>import('./components/Home.vue'),
            redirect:'./home/users',
            children:[
                {path:'users',component:()=>import('./components/subcomponts/Users.vue')},
                {path:'rights',component:()=>import('./components/subcomponts/Rights.vue')},
                {path:'orders',component:()=>import('./components/subcomponts/Orders.vue')},
                {path:'goods',component:()=>import('./components/subcomponts/Goods.vue')},
                {path:'settings',component:()=>import('./components/subcomponts/Settings.vue')},
            ]
        },

    ]
})
export default router